package com.it.share.origin.spring;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * @author Simon
 * @date 2021年07月03日 0:09
 */
@Component
@Aspect
public class ManAspectj {

    @Before("execution(* com.it.share.origin.spring.ShanXiMan.*(..))")
    public void before(JoinPoint joinPoint) {
        System.out.println("请说话:");
    }

    @AfterThrowing("execution(* com.it.share.origin.spring.ShanXiMan.*(..))")
    public void afterThrowing(JoinPoint joinPoint) {
        System.out.println("afterThrowing请说话:");
    }
}
